1. Field of the Invention
The present invention relates to a demultiplexer for extracting specific individual data from among packets in which the specific individual data is stored in predetermined units.
2. Description of the Related Art
In a digital broadcast system, a transmitter side generates, multiplexes, and transmits a plurality of programs worth of transport stream (TS) packets and TS packets in which program specific information (PSI) for extracting TS packets of an intended program are stored according to the Moving Picture Experts Group Phase 2 (MPEG2) standard. The PSI is additional information of image data and audio data.
A receiver side extracts the TS packets of the program designated by a user based on the PSI and packet identification numbers of the TS packets, decodes the encoded data of the image and audio stored in the extracted TS packets, and outputs the image and audio based on the decoded data of the image and audio.
The PSI includes a region program map table (PMT), a conditional access table (CAT), a network information table (NIT), a program association table (PAT), etc.
Summarizing the disadvantages to be solved by the invention, FIG. 1 is a schematic block configuration diagram of an example of the receiver.
This receiver 100 has a demultiplexer 10, a first decoder 21, a second decoder 22, and a central processing unit (CPU) 30.
The receiver 100 is supplied with a data train D10 comprised by a plurality of packets. The plurality of packets have first to third packets in which individual data is stored in predetermined units stored in data regions. Predetermined units of encoded image data are stored in the data region of the first packet, while control data corresponding to the related encoded image data and/or the related first packet are stored in a header region. Predetermined units of encoded audio data are stored in the data region of the second packet, while control data corresponding to the related audio data and/or the related second packet are stored in a header region. Additional information of the encoded image data and/or the encoded audio data are stored in the data region of the third packet, while control data corresponding to the related additional information and/or the related third packet are stored in the header region.
The demultiplexer 10 is supplied with the data train D10, demultiplexes the first packet from the data train D10 to extract encoded image data D1 from the related first packet, and supplies the extracted encoded image data D1 to the first decoder 21.
The first decoder 21 decodes the encoded image data D1 to generate a decoded image data D6 and outputs the generated decoded image data D6 to a display device 51. The display device 51 displays the image of the decoded image data D6 on a display screen.
Further, the demultiplexer 10 demultiplexes the second packet from the data train D10 to extract encoded audio data D2 from the related second packet and supplies the extracted encoded audio data D2 to the second decoder 22.
The second decoder 22 decodes the encoded audio data D2 to generate decoded audio data D7 and outputs the generated decoded audio data D7 to a speaker 52. The speaker 52 audio outputs the decoded audio data D7.
Further, the demultiplexer 10 demultiplexes the third packet from the data train D10 and supplies an additional information D3 from the related third packet to the CPU 30.
The CPU 30 is a controller for overall control of the receiver 100. This CPU 30 generates control signals C1 to C3, supplies the control signal C1 to the first decoder 21, supplies the control signal C2 to the second decoder 22, and supplies the control signal C3 to the demultiplexer 10.
The CPU 30 controls the demultiplexer 10 to demultiplex the first packet and extract the encoded image data D1 by the control signal C3 based on the additional information D3 from the demultiplexer 10.
Further, the CPU 30 controls the demultiplexer 10 to demultiplex the second packet and extract the encoded audio data D2 by the control signal C3 and controls the demultiplexer 10 to demultiplex the third packet and extracts the additional information D3.
FIG. 2 is a schematic block diagram of an example of the configuration of the demultiplexer 10 provided in the receiver 100 of FIG. 1.
This demultiplexer 10 has a packet demultiplexing means 19, a first extractor 11, a second extractor 12, and a third extractor 13. The packet demultiplexing means 19 and the first to third extractors 11 to 13 are controlled by the control signal C3 from the CPU 30.
The packet demultiplexing means 19 receives as input the data train D10, demultiplexes the data train D10 into first to third packets D11 to D13, supplies the first packet D11 to the first extractor 11, supplies the second packet D12 to the second extractor 12, and supplies the third packet D13 to the third extractor 13.
The first extractor 11 extracts the encoded image data D1 from the first packet D11 from the packet demultiplexing means 19 and outputs the extracted encoded image data D1 to the first decoder 21.
The second extractor 12 extracts the encoded audio data D2 from the second packet D12 from the packet demultiplexing means 19 and outputs the extracted encoded audio data D2 to the second decoder 22.
The third extractor 13 extracts the additional information D3 from the third packet D13 from the packet demultiplexing means 19 and outputs the extracted additional information D3 to the CPU 30.
The third extractor 13 has an extracting means 14, a header processing means 15, a memory 16, and a detecting means 40.
The extracting means 14 temporarily holds the third packet D13 from the demultiplexing means 19.
The header processing means 15 supplies control data D15 stored in the header region of the third packet D13 to the detecting means 40.
The memory 16 stores comparison data C16 and mask data M16 corresponding to the control data D15 and supplies the comparison data C16 and the mask data M16 to the detecting means 40.
The detecting means 40 compares the control data D15 from the header processing means 15 and the comparison data C16 from the memory 16 based on the mask data M16 and outputs detection signal D40 to the extracting means 14 when the result of comparison indicates coincidence.
The extracting means 14 extracts the additional information D3 from the third packet D13 held by the related extracting means 14 based on the detection signal D40 from the detecting means 40 and outputs the extracted additional information D3 to the CPU 30.
FIG. 3 is a schematic block diagram of an example of the configuration of the detecting means 40 provided in the demultiplexer 10 of FIG. 2.
This detecting means 40 has registers 41 to 43, a controlling means 44, an EX-OR circuit 45, an AND circuit 46, and an OR circuit 47.
The register 41 is supplied with and holds 8 bits of the control data D15 from the header processing means 15.
The register 42 is supplied with and holds 8 bits of the comparison data C16 from the memory 16.
The register 43 is supplied with and holds 8 bits of the mask data M16 from the memory 16.
The controlling means 44 supplies address data D16 to the memory 16, whereby the comparison data C16 and the mask data M16 corresponding to the address data D16 are supplied from the memory 16 to the registers 42 and 43. Further, the controlling means 44 controls a latch operation of the registers 41 to 43.
The control data D15 held in the register 41 and the comparison data C16 held in the register 42 are compared for every composing bit at the EX-OR circuit 45.
The AND logic of the output value of the EX-OR circuit 45 and the mask bit comprising the mask data M16 held in the register 43 is found at the AND circuit 46 for masking.
The OR logic of the output values of the AND circuit 46 is found at the OR circuit 47. When all bits coincide for an unmasked portion, the OR circuit 47 generates the detection signal D40 and outputs it to the extracting means 14.
Note that where the comparison of the control data and the comparison data is carried out for a plurality of bytes, use is made of a plurality of detecting means 40 corresponding to the plurality of bytes or use is made of a detecting means 40 in a time division manner corresponding to the plurality of bytes, and the detection signal D40 is output where they coincide for the related plurality of bytes.
FIG. 4 is an explanatory diagram of an example of the configuration of a data table of the mask data and the comparison data.
The mask data and the comparison data are classified into first to m-th condition data. Further, each of the first to the m-th condition data is divided into a first byte to n-th byte. By detecting coincidence of the comparison portions for the first byte to the n-th byte, it becomes possible to detect one type of packet among m types of the third packets. Note that m and n are integers of 2 or more.
When there are n bytes of the control data D15 for comparison as the control data contained in the third packet D13 and to be held in the register 41, it can be detected that the third packet D13 is a packet corresponding to the related condition data when the comparison shows complete coincidence for the unmasked portions for the first byte to the n-th byte.
In the demultiplexer 10, the additional information of the third packet matching the condition data is extracted again and supplied to the CPU even if it is an identical value to the additional information extracted at a previous time. For this reason, the demultiplexing of the demultiplexer 10 is redundant, and the processing load of the CPU 30 is large.
As an example, the control data in the header region of the third packet is sometimes provided with version number information indicating the version of the additional information of the image data in the first packet and/or the audio data in the second packet. The additional information is an example of the specific individual data.
In the third packet, when the version number information is identical and the additional information of the data region is identical, if the portion of the version number information is masked and excluded from the comparison, the identical additional information is supplied to the CPU 30 again, so the load of the signal processing of the CPU 30 becomes large.
An object of the present invention is to provide a demultiplexer capable of extracting specific individual data from packets in which the specific individual data is stored in predetermined units with a high efficiency.
To attain the above object, according to the present invention, there is provided a demultiplexer which is sequentially input with packets in which specific individual data is stored in predetermined units and extracts the specific individual data from the input packets, each packet comprised of predetermined units of specific individual data and control data corresponding to the related specific individual data and/or the related packet, said demultiplexer comprising: a first comparing means for comparing the control data in an input packet and first comparison data corresponding to a first predetermined portion of the related control data based on a mask bit corresponding to a composing bit of the related first comparison data, the first comparing means comparing portions corresponding to a mask bit having an unmasking value; a second comparing means for comparing the control data in an input packet and second comparison data corresponding to a second predetermined portion contained in the first predetermined portion of the related control data based on the first comparison data and the mask bit, the second comparing means comparing portions corresponding to a mask bit having a masking value and corresponding to composing bits having a first value; and an extracting means for extracting the predetermined units of the specific individual data from an input packet when a result of comparison of the first comparing means indicates coincidence and the result of comparison of the second comparing means indicates noncoincidence.
In the demultiplexer according to the present invention, preferably the first comparing means compares portions corresponding to a mask bit having a masking value among the control data and the first comparison data, and wherein said demultiplex further comprises a setting means for setting the result of comparison of the first comparing means for the related portions to indicate coincidence.
In the demultiplexer according to the present invention, preferably provision is further made of a storing means for storing a plurality of second comparison data in order, and a selecting means for selecting second comparison data of a predetermined order from the storing means and supplying the same to the second comparing means. The selecting means selects the second comparison data of the next order with respect to the predetermined order when the result of comparison of the first comparing means indicates coincidence and the result of comparison of the second comparing means indicates noncoincidence.
In the demultiplexer according to the present invention, more preferably, when the result of comparison of the first comparing means indicates coincidence and the result of comparison of the second comparing means indicates noncoincidence, the comparison portion of the control data indicated as noncoincidence by the second comparing means and the comparison portion of the second comparison data having the next order are the same value.
In the demultiplexer according to the present invention, preferably provision is further made of a packet demultiplexing means for demultiplexing a packet in which specific individual data is stored from a data train comprised of a plurality of individual data multiplexed in the form of packets in predetermined units and supplying the same to the extracting means; and a processing means for extracting the control data from the packet demultiplexed by the packet demultiplexing means and supplying the same to the first and second comparing means.
In the demultiplexer according to the present invention, it is also possible to employ a structure wherein, for example, the plurality of individual data are comprised by image data, audio data, and additional information of the image data and/or audio data, wherein the specific individual data is the additional information, and wherein the packet demultiplexing means demultiplexes the data train into packets in which the predetermined units of the image data are stored, packets in which predetermined units of the audio data are stored, and packets in which predetermined units of the additional information are stored.
In the demultiplexer according to the present invention, it is also possible to employ a structure wherein for example the control data in a packet is comprised by identification information of the specific individual data stored in the related packet and version number information indicating the version of the specific individual data stored in the related packet, wherein the mask bit corresponding to the portion of the identification information in the control data has an unmasking value, the first comparison data corresponding to the portion of the identification information has identification information of the specific individual data, and wherein the mask bit corresponding to the portion of the version number information in the control data has a masking value, and the composing bit of the first comparison data corresponding to the portion of the version number information has a first value.
The first comparing means compares the control data and the first comparison data for portions corresponding to a mask bit having an unmasking value.
The second comparing means compares the control data and the second comparison data for portions corresponding to a mask bit having a masking value and corresponding to a composing bit having the first value.
The extracting means extracts the predetermined units of specific individual data from an input packet when the result of comparison of the first comparing means indicates coincidence and the result of comparison of the second comparing means indicates noncoincidence.
In this way, in the demultiplexer according to the present invention, since provision is made of the second comparing means for comparing the control data and the second comparison data based on the mask bit and the first comparison data and since the additional information is demultiplexed when the portions corresponding to a mask bit having a masking value are different from each other, it is possible to prevent demultiplexing when the related portions coincide with each other and prevent redundancy of demultiplexing.